package demo5.demo1;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Text {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext a = new AnnotationConfigApplicationContext(SpringConfig.class);
        User1 bean = a.getBean(User1.class);
        bean.bb();
        a.close();//手动添加关闭资源
    }
}
